﻿using Dto;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using NXIBLL;
using NXModel;

namespace NXRKYY.API.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class YHJController : ControllerBase
    {
        public YHJController(INXBLL bll)
        {
            Bll = bll;
        }

        public INXBLL Bll { get; }
        [HttpGet]
        public Task<int> shanchu(int i)
        {
            return Bll.shanchu(i);
        }
        [HttpPost]
        public async Task<int> tianjia(YHJModel model)
        {
           return await Bll.tianjia(model);
        }
        [HttpGet]
        public Myhjdhbc xisnshi(int index, int size)
        {
            return Bll.xisnshi(index, size);
        }
        [HttpGet]
        public LoginModel Login(string name, string pwd)
        {
            return Bll.Login(name, pwd);
        }
    }
}
